package com.ft.admix.config;

import com.ft.admix.common.AdType;

import java.util.HashMap;
import java.util.Map;

public class AdClassConfig {
    private String platformName;    // 平台名称
    private Map<String, String> adClassMap;  // AdType -> 完整类名映射
    private String initializerClass; // SDK初始化类

    public String getPlatformName() {
        return platformName;
    }

    public Map<String, String> getAdClassMap() {
        return adClassMap;
    }

    public String getInitializerClass() {
        return initializerClass;
    }

    public AdClassConfig(Builder builder) {
        this.platformName = builder.platformName;
        this.adClassMap = builder.adClassMap;
        this.initializerClass = builder.initializerClass;
    }

    public static class Builder {
        private String platformName;
        private Map<String, String> adClassMap = new HashMap<>();
        private String initializerClass;
        
        public Builder platformName(String platformName) {
            this.platformName = platformName;
            return this;
        }
        
        public Builder addAdClass(AdType type, String className) {
            adClassMap.put(type.name(), className);
            return this;
        }
        
        public Builder initializerClass(String className) {
            this.initializerClass = className;
            return this;
        }
        
        public AdClassConfig build() {
            return new AdClassConfig(this);
        }
    }

}